<%@ page language="java" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> 
<%@ taglib uri="/WEB-INF/webflow.tld" prefix="webflow" %> 
<%@ taglib uri="/WEB-INF/webform.tld" prefix="webform" %> 

<html>
<head>
	<title><bean:message bundle="appCommonRes" key="dr.approve.title"/></title>
</head>

<body>
	
<script language="javascript">

function prepareSubmit(val) {
    document.reviewForm.action.value = val;
    document.reviewForm.submit();
}

</script>

<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="100%">
<div class="app_pageTitle"><bean:message bundle="appCommonRes" key="dr.approve.title"/></div> 

<jsp:useBean id="uploadView" scope="request" type="com.broadvision.web.util.ViewDynaBean"/> 
<bean:define id="doc0" name="uploadView" property="documentList[0]" />
<bean:define id="docType" name="doc0" property="docType" />
	
<!-- review is file document -->
<logic:equal name="docType" value="0">
<jsp:include page="fileList.jsp" flush="true" />
</logic:equal>

<!-- review is microsite document -->
<logic:equal name="docType" value="2">
<jsp:include page="../../ep/microsite/msDocList.jsp" flush="true" />
</logic:equal>

<div class="app_pageSubtitle">
  <span class="left"><bean:message bundle="appCommonRes" key="dr.commentList"/></span>
  <span class="right">&nbsp;</span>
</div>

<webflow:encode url="/approve.do" id="submitURL"/>
<%String url = (String)pageContext.getAttribute("submitURL");%>	
<form method="post" action="<html:rewrite page='<%=url%>'/>">
<webform:hidden url="<%=url%>" />

<div class="blockWrap">
<table class="dataTable" border="0" cellspacing="1" cellpadding="2" width="100%" summary="<bean:message bundle="appCommonRes" key="dr.commentList"/>">
<tr class="listHeader"> 
  <th id="Comment Item Number" align="left"><bean:message bundle="appCommonRes" key="dr.itemNumber"/></th>
  <th id="Category" align="left"><bean:message bundle="appCommonRes" key="dr.category"/></th>
  <th id="Page" align="left" nowrap><bean:message bundle="appCommonRes" key="dr.pageNumber"/></th>
  <th id="Paragraph" align="left" nowrap><bean:message bundle="appCommonRes" key="dr.paragraph"/></th>
  <th id="Comment" align="left" nowrap><bean:message bundle="appCommonRes" key="dr.comment"/></th>
  <th id="Cross reference" align="left" nowrap><bean:message bundle="appCommonRes" key="dr.crossRef"/></th>
</tr>     
<logic:iterate id="comment" name="uploadView" property="commentList" indexId="index">  
<tr class='<%=index.intValue() %2 == 0 ? "listEven" : "listOdd"%>'>
  <td headers="Comment Item Number"><bean:write name="comment" property="commentItemNum"/></td>
  <td headers="Category"><bean:write name="comment" property="category"/></td>
  <td headers="Page"><bean:write name="comment" property="pageNum"/></td>
  <td headers="Paragraph"><bean:write name="comment" property="para"/></td>
  <td headers="Comment"><bean:write name="comment" property="comments"/></td>
  <td headers="Cross reference"><bean:write name="comment" property="crossRef"/></td>
</tr>
</logic:iterate>
</table>

<div class="pageButtonWrap" align="right">
<input hspace="40" type="submit" name="Submit" class="pageButton" value="<bean:message bundle="appCommonRes" key="dr.approve"/>">
<input hspace="40" type="submit" name="Submit" class="pageButton" value="<bean:message bundle="appCommonRes" key="dr.deny"/>">
</div>

</form>
</div>

</td>
</tr>
</table>

</body>
</html>
